<template>
  <div class="list_question_cell">
      <nuxt-link class="title" :to="`/question/${info.id}`">
        <img
          :src="
            require('@/assets/images/hospital/problem_' + (index + 1) + '.png')
          "
          class="img"
          alt=""
        />
        <span class="name ellipsis">{{ info.question }}</span>
      </nuxt-link>
    <div class="review" v-if="index < 6">
      {{ info.initReadCnt }} 浏览·{{ $getAnswerList(info) }}回答
    </div>
  </div>
</template>
<script>
import qs from "qs";
export default {
  name: "ListQuestion",
  props: {
    info: {
      type: Object,
      default: function () {
        return {};
      },
    },
    index: {
      type: [String, Number],
      default: 0,
    },
  },
  data() {
    return {};
  },
  methods: {
    // 查看详情
    lookDetail() {
      let o = this.info;
      let query = this.$route.query;
      query.id = o.id;
      let _path = `/question/detail?${qs.stringify(query)}`;
      console.log(_path);
      window.location.replace(_path);
    },
  },
};
</script>
<style lang="less" scoped>
@import "./listCell.less";
</style>